from selenium import webdriver
cookies = [
    {
        "domain": ".51job.com",
        "expirationDate": 1565419740.650436,
        "hostOnly": True,
        "httpOnly": True,
        "name": "_ujz",
        "path": "/",
        "sameSite": "no_restriction",
        "secure": False,
        "session": False,
        "storeId": "0",
        "value": "NDAwMTU3NjUw",
        "id": 1
    },
    {
        "domain": ".51job.com",
        "hostOnly": False,
        "httpOnly": True,
        "name": "51job",
        "path": "/",
        "sameSite": "no_restriction",
        "secure": False,
        "session": True,
        "storeId": "0",
        "value": "cuid%3D40015765%26%7C%26cusername%3Djangshi%26%7C%26cpassword%3D%26%7C%26cname%3D%25C1%25F5%25CB%25C9%25CC%25CE%26%7C%26cemail%3Dsonto.lau%2540gmail.com%26%7C%26cemailstatus%3D0%26%7C%26cnickname%3D%26%7C%26ccry%3D.0xrs42CkutkE%26%7C%26cconfirmkey%3Dsoy9yHodNTS3I%26%7C%26cresumeids%3D.0tem6AyYvwH2%257C.0dhz0fpTFQGM%257C%26%7C%26cautologin%3D0%26%7C%26cenglish%3D0%26%7C%26sex%3D0%26%7C%26cnamekey%3DsoeHEcaKdsNAg%26%7C%26to%3D3c7e4e5554540ebfe01af8c78ef3a8c25d26dbdb%26%7C%26",
        "id": 2
    },
    {
        "domain": ".51job.com",
        "expirationDate": 1588161128.020138,
        "hostOnly": False,
        "httpOnly": True,
        "name": "guid",
        "path": "/",
        "sameSite": "no_restriction",
        "secure": False,
        "session": False,
        "storeId": "0",
        "value": "638ff0af453c736ea83ceec731798bb7",
        "id": 3
    },
    {
        "domain": ".51job.com",
        "expirationDate": 1594175494.836241,
        "hostOnly": False,
        "httpOnly": True,
        "name": "nsearch",
        "path": "/",
        "sameSite": "no_restriction",
        "secure": False,
        "session": False,
        "storeId": "0",
        "value": "jobarea%3D%26%7C%26ord_field%3D%26%7C%26recentSearch0%3D%26%7C%26recentSearch1%3D%26%7C%26recentSearch2%3D%26%7C%26recentSearch3%3D%26%7C%26recentSearch4%3D%26%7C%26collapse_expansion%3D",
        "id": 4
    },
    {
        "domain": ".51job.com",
        "expirationDate": 3114129128,
        "hostOnly": False,
        "httpOnly": True,
        "name": "partner",
        "path": "/",
        "sameSite": "no_restriction",
        "secure": False,
        "session": False,
        "storeId": "0",
        "value": "51jobjson",
        "id": 5
    },
    {
        "domain": ".51job.com",
        "hostOnly": False,
        "httpOnly": True,
        "name": "ps",
        "path": "/",
        "sameSite": "no_restriction",
        "secure": False,
        "session": True,
        "storeId": "0",
        "value": "needv%3D0",
        "id": 6
    },
    {
        "domain": ".51job.com",
        "expirationDate": 1594175494.836125,
        "hostOnly": False,
        "httpOnly": True,
        "name": "search",
        "path": "/",
        "sameSite": "no_restriction",
        "secure": False,
        "session": False,
        "storeId": "0",
        "value": "jobarea%7E%60090200%7C%21ord_field%7E%600%7C%21recentSearch0%7E%601%A1%FB%A1%FA090200%2C00%A1%FB%A1%FA000000%A1%FB%A1%FA0000%A1%FB%A1%FA00%A1%FB%A1%FA9%A1%FB%A1%FA99%A1%FB%A1%FA99%A1%FB%A1%FA99%A1%FB%A1%FA99%A1%FB%A1%FA99%A1%FB%A1%FA99%A1%FB%A1%FAPython+%BF%AA%B7%A2%A1%FB%A1%FA2%A1%FB%A1%FA%A1%FB%A1%FA-1%A1%FB%A1%FA1562575983%A1%FB%A1%FA0%A1%FB%A1%FA%A1%FB%A1%FA%7C%21recentSearch1%7E%601%A1%FB%A1%FA090200%2C00%A1%FB%A1%FA000000%A1%FB%A1%FA0000%A1%FB%A1%FA00%A1%FB%A1%FA9%A1%FB%A1%FA99%A1%FB%A1%FA99%A1%FB%A1%FA99%A1%FB%A1%FA99%A1%FB%A1%FA99%A1%FB%A1%FA99%A1%FB%A1%FApython%A1%FB%A1%FA2%A1%FB%A1%FA%A1%FB%A1%FA-1%A1%FB%A1%FA1561426718%A1%FB%A1%FA0%A1%FB%A1%FA%A1%FB%A1%FA%7C%21recentSearch2%7E%601%A1%FB%A1%FA090200%2C00%A1%FB%A1%FA000000%A1%FB%A1%FA0000%A1%FB%A1%FA00%A1%FB%A1%FA9%A1%FB%A1%FA99%A1%FB%A1%FA99%A1%FB%A1%FA99%A1%FB%A1%FA99%A1%FB%A1%FA99%A1%FB%A1%FA99%A1%FB%A1%FA%B2%FA%C6%B7%B2%DF%BB%AE%A1%FB%A1%FA2%A1%FB%A1%FA%A1%FB%A1%FA-1%A1%FB%A1%FA1559097984%A1%FB%A1%FA0%A1%FB%A1%FA%A1%FB%A1%FA%7C%21",
        "id": 7
    },
    {
        "domain": ".51job.com",
        "hostOnly": False,
        "httpOnly": True,
        "name": "slife",
        "path": "/",
        "sameSite": "no_restriction",
        "secure": False,
        "session": True,
        "storeId": "0",
        "value": "lastvisit%3D090200%26%7C%26lowbrowser%3Dnot%26%7C%26lastlogindate%3D20190711%26%7C%26",
        "id": 8
    }
]
options = webdriver.ChromeOptions()
options.add_argument("headless")
options.add_argument("disable-gpu")
driver = webdriver.Chrome(options=options)
driver.get("https://www.51job.com")
for c in cookies:
    driver.add_cookie(c)
driver.get("https://i.51job.com/userset/my_51job.php?lang=c")
# username_input = driver.find_element_by_name("loginname")
# password_input = driver.find_element_by_name("password")
# login_btn = driver.find_element_by_id("login_btn")
#
# username_input.send_keys("sonto.lau@gmail.com")
# password_input.send_keys("sonto870122")
# login_btn.submit()
import time
time.sleep(10)
driver.quit()
